package com.eastdigit.shiro;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

/**
 * Created by acer on 15-2-5.
 */
public class GlobalInput {

    public static String getCurrentUserId() {
        Subject currentUser = SecurityUtils.getSubject();
        return (String) currentUser.getPrincipals().iterator().next();
    }
}
